package com.ruoyi.land.service.impl;

import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.land.domain.MfLandlord;
import com.ruoyi.land.mapper.MfLandlordMapper;
import com.ruoyi.land.service.IMfLandlordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 房东信息Service业务层处理
 * 
 * @author yuanrui
 * @date 2025-07-22
 */
@Service
public class MfLandlordServiceImpl implements IMfLandlordService 
{
    @Autowired
    private MfLandlordMapper mfLandlordMapper;

    /**
     * 查询房东信息
     * 
     * @param landlordId 房东信息主键
     * @return 房东信息
     */
    @Override
    public MfLandlord selectMfLandlordByLandlordId(Long landlordId)
    {
        return mfLandlordMapper.selectMfLandlordByLandlordId(landlordId);
    }

    /**
     * 查询房东信息列表
     * 
     * @param mfLandlord 房东信息
     * @return 房东信息
     */
    @Override
    public List<MfLandlord> selectMfLandlordList(MfLandlord mfLandlord)
    {
        return mfLandlordMapper.selectMfLandlordList(mfLandlord);
    }

    /**
     * 新增房东信息
     * 
     * @param mfLandlord 房东信息
     * @return 结果
     */
    @Override
    public int insertMfLandlord(MfLandlord mfLandlord)
    {
        mfLandlord.setCreateTime(DateUtils.getNowDate());
        return mfLandlordMapper.insertMfLandlord(mfLandlord);
    }

    /**
     * 修改房东信息
     * 
     * @param mfLandlord 房东信息
     * @return 结果
     */
    @Override
    public int updateMfLandlord(MfLandlord mfLandlord)
    {
        return mfLandlordMapper.updateMfLandlord(mfLandlord);
    }

    /**
     * 批量删除房东信息
     * 
     * @param landlordIds 需要删除的房东信息主键
     * @return 结果
     */
    @Override
    public int deleteMfLandlordByLandlordIds(Long[] landlordIds)
    {
        return mfLandlordMapper.deleteMfLandlordByLandlordIds(landlordIds);
    }

    /**
     * 删除房东信息信息
     * 
     * @param landlordId 房东信息主键
     * @return 结果
     */
    @Override
    public int deleteMfLandlordByLandlordId(Long landlordId)
    {
        return mfLandlordMapper.deleteMfLandlordByLandlordId(landlordId);
    }
}
